home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Finder Dungeon / source code / MoreFiles 1.4.6 / Pascal Interfaces / FileCopy.p < prev    next >
Encoding:
Text File  |  1997-06-28  |  1.7 KB  |  55 lines  |  [TEXT/MPS ]

  1. UNIT FileCopy;
  2.  
  3. {    Apple Macintosh Developer Technical Support                                }
  4. {                                                                            }
  5. {    FileCopy: A robust, general purpose file copy routine.                    }
  6. {    by Jim Luther, Apple Developer Technical Support Emeritus                }
  7. {                                                                            }
  8. {    File:        FileCopy.p                                                    }
  9. {                                                                            }
  10. {    Copyright © 1992-1996 Apple Computer, Inc.                                }
  11. {    All rights reserved.                                                    }
  12. {                                                                            }
  13. {    You may incorporate this sample code into your applications without        }
  14. {    restriction, though the sample code has been provided "AS IS" and the    }
  15. {    responsibility for its operation is 100% yours.  However, what you are    }
  16. {    not permitted to do is to redistribute the source as "DSC Sample Code"    }
  17. {    after having made changes. If you're going to re-distribute the source,    }
  18. {    we require that you make it clear in the source that the code was        }
  19. {    descended from Apple Sample Code, but that you've made changes.            }
  20.  
  21.  
  22. INTERFACE
  23.  
  24.     USES
  25.         Types, Files;
  26.  
  27. {***************************************************************************}
  28.  
  29.  
  30.     FUNCTION FileCopy (srcVRefNum: Integer;
  31.                                     srcDirID: LongInt;
  32.                                     srcName: Str255;
  33.                                     dstVRefNum: Integer;
  34.                                     dstDirID: LongInt;
  35.                                     dstPathname: StringPtr;
  36.                                     copyName: StringPtr;
  37.                                     copyBufferPtr: Ptr;
  38.                                     copyBufferSize: LongInt;
  39.                                     preflight: Boolean): OSErr;
  40.  
  41.     FUNCTION FSpFileCopy ({CONST}
  42.                                     VAR srcSpec: FSSpec;
  43.                                     {CONST}
  44.                                     VAR dstSpec: FSSpec;
  45.                                     copyName: StringPtr;
  46.                                     copyBufferPtr: Ptr;
  47.                                     copyBufferSize: LongInt;
  48.                                     preflight: Boolean): OSErr;
  49.  
  50.  
  51. {***************************************************************************}
  52.  
  53. IMPLEMENTATION
  54.  
  55. END.